import Vue from 'vue'
import App from './App'

import store from './store'



// main.js文件
import './util/format.js'
import StorageCache from './util/StorageSync.js'
Vue.prototype.StorageCache = StorageCache



Vue.config.productionTip = false

Vue.prototype.$store = store
Vue.prototype.$backgroundAudioData = {
	playing: false,
	playTime: 0,
	formatedPlayTime: '00:00:00'
}

Vue.prototype.url = "http://192.168.1.137:83/"
Vue.prototype.$adpid = "1111111111"

App.mpType = 'app'

const app = new Vue({
	store,
	...App
})
app.$mount()


//检测用户是否登录
Vue.prototype.checkLogin = function(){
	let user=this.StorageCache('user')

    if(user != undefined ){

    }else{
	uni.navigateTo({
	    url: '/pages/login/index',
	    success(){
	        let page = getCurrentPages().pop(); //跳转页面成功之后
	        if (!page) return;
	           	location.reload()
	        }
	});
	}
}
